<template>
    <div class="center">
        <v-chart :option="option()" autoresize />
    </div>
</template>

<script>
const animationDuration = 3000
export default {
    name: 'Left',
    methods: {
        option: () => {
            return {
                legend: {
                    left: 'center',
                    bottom: '10',
                    data: ['Allocated Budget', 'Actual Spending', 'Actual Spending']
                },
                radar: {
                    radar: '60%',
                    center: ['50%', '42%'],
                    splitNumber: 8,
                    splitArea: {
                        areaStyle: {
                            color: 'rgba(127,95,132,.2)',
                            opacity: 1,
                            shadowBlur: 45,
                            shadowColor: 'rgba(0,0,0,0.1)',
                            shadowOffsetX: 0,
                            shadowOffsetY: 15
                        }
                    },
                    indicator: [
                        { name: 'Sales', max: 6500 },
                        { name: 'Administration', max: 16000 },
                        { name: 'Information Technology', max: 30000 },
                        { name: 'Customer Support', max: 38000 },
                        { name: 'Development', max: 52000 },
                        { name: 'Marketing', max: 25000 }
                    ]
                },
                series: [
                    {
                        type: 'radar',
                        symbolSize: 0,
                        areaStyle: {
                            normal: {
                                shadowBlur: 13,
                                shadowColor: 'rgba(0,0,0,.2)',
                                shadowOffsetX: 0,
                                shadowOffsetY: 10,
                                opacity: 1
                            }
                        },
                        data: [
                            {
                                value: [5000, 7000, 12000, 11000, 15000, 14000],
                                name: 'Allocated Budget' // 底部字条
                            },
                            {
                                value: [4000, 9000, 15000, 15000, 13000, 11000],
                                name: 'Expected Spending'
                            },
                            {
                                value: [5500, 11000, 12000, 15000, 12000, 12000],
                                name: 'Actual Spending'
                            }
                        ],
                        animationDuration: animationDuration
                    }
                ]
            };
        }
    }

}
</script>

<style>

</style>